#pragma config(Hubs,  S1, HTMotor,  HTServo,  none,     none)
#pragma config(Sensor, S3,     seeker,         sensorHiTechnicIRSeeker600)
#pragma config(Motor,  mtr_S1_C1_1,     Left,          tmotorTetrix, openLoop, encoder)
#pragma config(Motor,  mtr_S1_C1_2,     Right,         tmotorTetrix, openLoop, encoder)
#pragma config(Servo,  srvo_S1_C2_1,    flipper,              tServoStandard)
#pragma config(Servo,  srvo_S1_C2_2,    servo2,               tServoNone)
#pragma config(Servo,  srvo_S1_C2_3,    servo3,               tServoNone)
#pragma config(Servo,  srvo_S1_C2_4,    servo4,               tServoNone)
#pragma config(Servo,  srvo_S1_C2_5,    servo5,               tServoNone)
#pragma config(Servo,  srvo_S1_C2_6,    servo6,               tServoNone)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#include "JoystickDriver.c"

task main()
{
	waitForStart();
	nMotorEncoder[Left] = 0;

	while (nMotorEncoder[Left] < 4290)
	{
		motor[Left] = 50;
		motor[Right] = 50;
	}
	motor[Left] = 0;
	motor[Right] = 0;
	nMotorEncoder[Left] = 0;
	wait1Msec(100);

	while (nMotorEncoder[Left] < 1170)
	{
		motor[Left] = 50;
		motor[Right] = -50;
	}
	motor[Left] = 0;
	motor[Right] = 0;
	nMotorEncoder[Left] = 0;
}
